const Sequelize = require('sequelize');
const db = require('../config/db');

// 创建model
var UserModel = db.define('user', {
    account: {
        type: Sequelize.STRING,
        field: 'account'
    },
    password: {
        type: Sequelize.STRING,
        field: 'password'
    },
    name: {
        type: Sequelize.STRING,
        field: 'name'
    },
    role: {
        type: Sequelize.STRING,
        field: 'role'
    },
    avatar:{
        type: Sequelize.STRING,
        field: 'avatar'
    }
},
{ timestamps:false }
)

module.exports = UserModel